<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>控制台</title>
    <script src="../static/js/jquery.js"></script>
</head>
<body>
    <div>
    <h1>图像显示</h1>
    <img class="shoot_img" src="static/img/tea.png" alt="拍摄图"><!--src={{img}}-->
    </div>
    <form action="/stop_shoot" enctype='multipart/form-data' method='POST'>
        <input type='submit' value='停止'>
    </form>
    <div id="img_path">图片路径</div>

<!--    &lt;!&ndash;2秒刷新&ndash;&gt;-->
<!--    {% if 0 == stop %}-->
<!--    meta http-equiv="refresh" content="2;url={{ url_for('show_img') }}"-->
<!--    {% endif %}-->

<!--    <script>-->
<!--          function show_image(){-->
<!--            $.ajax({-->
<!--              url:"/commands",-->
<!--              timeout:15000,//超时时间是15秒;-->
<!--              success:function(data){-->
<!--                $("#img_path").html(data);-->
<!--                $(".shoot_img").attr('src',data);//.查找class-->
<!--              },-->
<!--              error:function(xhr,type,errorThrown){-->

<!--              }-->
<!--            });-->
<!--          }-->

<!--    setInterval(show_image,3000);//3s-->
    </script>

</body>
</html>